Back to Index

Browser Detection and Redirect

 

 

This script detects the visitors' browser and redirects them to the appropriate page.  For Example if the visitor's browser is Netscape the visitor will be redirected to a Netscape "Friendly" page and the same for Internet Explorer.  If a different browser is detected they're sent to a generic Home page.  Link highlighted in yellow.

Place script in the body of the HTML Document.

<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">


if(navigator.appName == "Netscape") {
window.location="homenc.htm"
}
else
if(navigator.appName == "Microsoft Internet Explorer") {
window.location="homeie.htm"
}
else { window.location="homeg.htm"

}

</SCRIPT>

 

 

Script

 

� Copyright 2009 ashesh.com.np